<?php
function display_post($post, $requestContext)
{
	$sessionInfo = $requestContext->sessionInfo;
?>
							<div style="width:100%; display:inline-block;">
								<img src="<?php echo profile_img_url( $post->creatorProfileImageSid, 40) ?>" style="float:left; padding:5px">
								<div style="margin-right:50px"><b><?php echo $post->creatorDisplayName; ?></b>
									@ <a href="#<?php echo controller_base_path($requestContext).'Project/'.$post->projectSid; ?>"><?php echo $post->projectName; ?></a><br />
									<?php echo $post->body; ?>
<?php 
if ( isset($post->commentDtos) ) {
	foreach ($post->commentDtos as $comment) {
?>									
									<blockquote>
										<?php echo $comment->body; ?>
									</blockquote>
<?php 
	}
} ?>
									<div>
										<a href="#">Comment</a> | <?php echo datetime_format_convert($post->createDt, FORMAT_DATE_ISO, $sessionInfo->userInfo['dateFormat']). ' ('. time_ago($post->createDt).' ago)'; ?>
										<form class="quick-form" name="CommentForm" action="<?php echo controller_base_path($requestContext); ?>/Post/addcomment" method="post"><input type="hidden" id="targetSid" name="targetSid" value="<?php echo $post->sid ?>" /><input id="body" name="body" /></form>
									</div>
								</div>
							</div>
<?php
}
?>